package com.awcall.iot.mapper;

import com.awcall.iot.model.Authority;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.baomidou.mybatisplus.plugins.Page;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
  * 权限表 Mapper 接口
 * </p>
 *
 * @author wuhui
 * @since 2018-03-05
 */
public interface AuthorityMapper extends BaseMapper<Authority> {

    List<Authority> findByParams(@Param("title") String title, Page<Authority> page);

    List<Authority> findBySystemUserId(Integer userId);

    List<Authority> findByRoleId(Integer roleId);

    List<Authority> findAuthorityTree();

}